﻿using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore;

namespace HR.Models;

public partial class HRDBContext : DbContext
{
    public HRDBContext()
    {
    }

    public HRDBContext(DbContextOptions<HRDBContext> options)
        : base(options)
    {
    }

    public virtual DbSet<bonu> bonus { get; set; }

    public virtual DbSet<config_file_first_kind> config_file_first_kinds { get; set; }

    public virtual DbSet<config_file_second_kind> config_file_second_kinds { get; set; }

    public virtual DbSet<config_file_third_kind> config_file_third_kinds { get; set; }

    public virtual DbSet<config_major> config_majors { get; set; }

    public virtual DbSet<config_major_kind> config_major_kinds { get; set; }

    public virtual DbSet<config_primary_key> config_primary_keys { get; set; }

    public virtual DbSet<config_public_char> config_public_chars { get; set; }

    public virtual DbSet<config_question_first_kind> config_question_first_kinds { get; set; }

    public virtual DbSet<config_question_second_kind> config_question_second_kinds { get; set; }

    public virtual DbSet<engage_answer> engage_answers { get; set; }

    public virtual DbSet<engage_answer_detail> engage_answer_details { get; set; }

    public virtual DbSet<engage_exam> engage_exams { get; set; }

    public virtual DbSet<engage_exam_detail> engage_exam_details { get; set; }

    public virtual DbSet<engage_interview> engage_interviews { get; set; }

    public virtual DbSet<engage_major_release> engage_major_releases { get; set; }

    public virtual DbSet<engage_resume> engage_resumes { get; set; }

    public virtual DbSet<engage_subject> engage_subjects { get; set; }

    public virtual DbSet<human_file> human_files { get; set; }

    public virtual DbSet<human_file_dig> human_file_digs { get; set; }

    public virtual DbSet<major_change> major_changes { get; set; }

    public virtual DbSet<salary_grant> salary_grants { get; set; }

    public virtual DbSet<salary_grant_detail> salary_grant_details { get; set; }

    public virtual DbSet<salary_standard> salary_standards { get; set; }

    public virtual DbSet<salary_standard_detail> salary_standard_details { get; set; }

    public virtual DbSet<training> training { get; set; }

    public virtual DbSet<user> users { get; set; }

    public virtual DbSet<Role> roles { get; set; }

    public virtual DbSet<Menu> menus { get; set; }

    public virtual DbSet<RoleMenuMid> rolemenumids { get; set; }



    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.
        => optionsBuilder.UseSqlServer("Data Source=YUANZAIZAI-PC;Initial Catalog=HR_DB;Persist Security Info=True;User ID=sa;Password=root;TrustServerCertificate=true");

    protected override void OnModelCreating(ModelBuilder modelBuilder)
    {
        modelBuilder.Entity<bonu>(entity =>
        {
            entity.HasKey(e => e.bon_id).HasName("bonus_PK");

            entity.Property(e => e.bonus_degree)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.bonus_item)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.bonus_worth).HasColumnType("money");
            entity.Property(e => e.check_time).HasColumnType("datetime");
            entity.Property(e => e.checker)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.human_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.major_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.major_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.regist_time).HasColumnType("datetime");
            entity.Property(e => e.register)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.remark).HasColumnType("text");
        });

        modelBuilder.Entity<config_file_first_kind>(entity =>
        {
            entity.HasKey(e => e.ffk_id).HasName("config_file_first_kind_PK");

            entity.ToTable("config_file_first_kind");

            entity.Property(e => e.first_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.first_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.first_kind_salary_id).HasColumnType("text");
            entity.Property(e => e.first_kind_sale_id).HasColumnType("text");
        });

        modelBuilder.Entity<config_file_second_kind>(entity =>
        {
            entity.HasKey(e => e.fsk_id).HasName("config_file_second_kind_PK");

            entity.ToTable("config_file_second_kind");

            entity.Property(e => e.first_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.first_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.second_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.second_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.second_salary_id).HasColumnType("text");
            entity.Property(e => e.second_sale_id).HasColumnType("text");
        });

        modelBuilder.Entity<config_file_third_kind>(entity =>
        {
            entity.HasKey(e => e.ftk_id).HasName("config_file_third_kind_PK");

            entity.ToTable("config_file_third_kind");

            entity.Property(e => e.first_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.first_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.second_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.second_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.third_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.third_kind_is_retail)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.third_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.third_kind_sale_id).HasColumnType("text");
        });

        modelBuilder.Entity<config_major>(entity =>
        {
            entity.HasKey(e => e.mak_id).HasName("config_major_PK");

            entity.ToTable("config_major");

            entity.Property(e => e.major_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.major_name)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<config_major_kind>(entity =>
        {
            entity.HasKey(e => e.mfk_id).HasName("config_major_kind_PK");

            entity.ToTable("config_major_kind");

            entity.Property(e => e.major_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<config_primary_key>(entity =>
        {
            entity.HasKey(e => e.prk_id).HasName("config_primary_key_PK");

            entity.ToTable("config_primary_key");

            entity.Property(e => e.key_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.primary_key)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.primary_key_table)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<config_public_char>(entity =>
        {
            entity.HasKey(e => e.pbc_id).HasName("config_public_char_PK");

            entity.ToTable("config_public_char");

            entity.Property(e => e.attribute_kind)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.attribute_name)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<config_question_first_kind>(entity =>
        {
            entity.HasKey(e => e.qfk_id).HasName("config_question_first_kind_PK");

            entity.ToTable("config_question_first_kind");

            entity.Property(e => e.first_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.first_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<config_question_second_kind>(entity =>
        {
            entity.HasKey(e => e.qsk_id).HasName("config_question_second_kind_PK");

            entity.ToTable("config_question_second_kind");

            entity.Property(e => e.first_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.first_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.second_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.second_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<engage_answer>(entity =>
        {
            entity.HasKey(e => e.ans_id).HasName("engage_answer_PK");

            entity.ToTable("engage_answer");

            entity.Property(e => e.answer_number)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.exam_number)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.human_idcard)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.human_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.major_id)
                .HasMaxLength(10)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_kind_name)
                .HasMaxLength(10)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_name)
                .HasMaxLength(10)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.test_time).HasColumnType("datetime");
            entity.Property(e => e.total_point).HasColumnType("numeric(5, 2)");
            entity.Property(e => e.use_time)
                .HasMaxLength(20)
                .IsUnicode(false);
        });

        modelBuilder.Entity<engage_answer_detail>(entity =>
        {
            entity.HasKey(e => e.and_id).HasName("engage_answer_details_PK");

            entity.Property(e => e.answer)
                .HasMaxLength(10)
                .IsUnicode(false);
            entity.Property(e => e.answer_number)
                .HasMaxLength(30)
                .IsUnicode(false);
        });

        modelBuilder.Entity<engage_exam>(entity =>
        {
            entity.HasKey(e => e.exa_id).HasName("engage_exam_PK");

            entity.ToTable("engage_exam");

            entity.Property(e => e.exam_number)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.major_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.major_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.regist_time).HasColumnType("datetime");
            entity.Property(e => e.register)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<engage_exam_detail>(entity =>
        {
            entity.HasKey(e => e.exd_id).HasName("engage_exam_details_PK");

            entity.Property(e => e.exam_number)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.first_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.first_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.second_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.second_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<engage_interview>(entity =>
        {
            entity.HasKey(e => e.ein_id).HasName("engage_interview_PK");

            entity.ToTable("engage_interview");

            entity.Property(e => e.EQ_degree)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.IQ_degree)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.check_comment).HasColumnType("text");
            entity.Property(e => e.check_time).HasColumnType("datetime");
            entity.Property(e => e.checker)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.foreign_language_degree)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.human_major_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.human_major_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.human_major_kind_name)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.human_major_name)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.human_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.image_degree)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.interview_comment).HasColumnType("text");
            entity.Property(e => e.multi_quality_degree)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.native_language_degree)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.registe_time).HasColumnType("datetime");
            entity.Property(e => e.register)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.response_speed_degree)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.result)
                .HasMaxLength(20)
                .IsUnicode(false);
        });

        modelBuilder.Entity<engage_major_release>(entity =>
        {
            entity.HasKey(e => e.mre_id).HasName("engage_major_release_PK");

            entity.ToTable("engage_major_release");

            entity.Property(e => e.change_time).HasColumnType("datetime");
            entity.Property(e => e.changer)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.deadline).HasColumnType("datetime");
            entity.Property(e => e.engage_required).HasColumnType("text");
            entity.Property(e => e.engage_type)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.first_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.first_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.major_describe).HasColumnType("text");
            entity.Property(e => e.major_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.major_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.regist_time).HasColumnType("datetime");
            entity.Property(e => e.register)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.second_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.second_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.third_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.third_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<engage_resume>(entity =>
        {
            entity.HasKey(e => e.res_id).HasName("engage_resume_PK");

            entity.ToTable("engage_resume");

            entity.Property(e => e.attachment_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.check_time).HasColumnType("datetime");
            entity.Property(e => e.checker)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.demand_salary_standard).HasColumnType("numeric(15, 2)");
            entity.Property(e => e.engage_type)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.human_address)
                .HasMaxLength(200)
                .IsUnicode(false);
            entity.Property(e => e.human_birthday).HasColumnType("datetime");
            entity.Property(e => e.human_birthplace)
                .HasMaxLength(200)
                .IsUnicode(false);
            entity.Property(e => e.human_college)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_educated_degree)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_educated_major)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_email)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_history_records).HasColumnType("text");
            entity.Property(e => e.human_hobby)
                .HasMaxLength(200)
                .IsUnicode(false);
            entity.Property(e => e.human_homephone)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_idcard)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_major_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.human_major_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.human_major_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_major_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_mobilephone)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_nationality)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_party)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_picture)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_postcode)
                .HasMaxLength(10)
                .IsUnicode(false);
            entity.Property(e => e.human_race)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_religion)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_sex)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.human_specility)
                .HasMaxLength(200)
                .IsUnicode(false);
            entity.Property(e => e.human_telephone)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.pass_checkComment)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.pass_check_time).HasColumnType("datetime");
            entity.Property(e => e.pass_checker)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.pass_passComment)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.pass_regist_time).HasColumnType("datetime");
            entity.Property(e => e.pass_register)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.recomandation).HasColumnType("text");
            entity.Property(e => e.regist_time).HasColumnType("datetime");
            entity.Property(e => e.register)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.remark).HasColumnType("text");
            entity.Property(e => e.test_check_time).HasColumnType("datetime");
            entity.Property(e => e.test_checker)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<engage_subject>(entity =>
        {
            entity.HasKey(e => e.sub_id).HasName("engage_subjects_PK");

            entity.Property(e => e.change_time).HasColumnType("datetime");
            entity.Property(e => e.changer)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.content).HasColumnType("text");
            entity.Property(e => e.correct_key)
                .HasMaxLength(10)
                .IsUnicode(false);
            entity.Property(e => e.derivation)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.first_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.first_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.key_a).HasColumnType("text");
            entity.Property(e => e.key_b).HasColumnType("text");
            entity.Property(e => e.key_c).HasColumnType("text");
            entity.Property(e => e.key_d).HasColumnType("text");
            entity.Property(e => e.key_e).HasColumnType("text");
            entity.Property(e => e.regist_time).HasColumnType("datetime");
            entity.Property(e => e.register)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.second_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.second_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<human_file>(entity =>
        {
            entity.HasKey(e => e.huf_id).HasName("human_file_PK");

            entity.ToTable("human_file");

            entity.Property(e => e.attachment_name)
                .HasMaxLength(255)
                .IsUnicode(false);
            entity.Property(e => e.change_time).HasColumnType("datetime");
            entity.Property(e => e.changer)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.check_time).HasColumnType("datetime");
            entity.Property(e => e.checker)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.delete_time).HasColumnType("datetime");
            entity.Property(e => e.demand_salaray_sum).HasColumnType("money");
            entity.Property(e => e.first_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.first_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_account)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.human_address)
                .HasMaxLength(200)
                .IsUnicode(false);
            entity.Property(e => e.human_bank)
                .HasMaxLength(50)
                .IsUnicode(false);
            entity.Property(e => e.human_birthday).HasColumnType("datetime");
            entity.Property(e => e.human_birthplace)
                .HasMaxLength(50)
                .IsUnicode(false);
            entity.Property(e => e.human_educated_degree)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_educated_major)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_email)
                .HasMaxLength(50)
                .IsUnicode(false);
            entity.Property(e => e.human_family_membership).HasColumnType("text");
            entity.Property(e => e.human_histroy_records).HasColumnType("text");
            entity.Property(e => e.human_hobby)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.human_id_card)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.human_major_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.human_major_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.human_major_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_mobilephone)
                .HasMaxLength(11)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.human_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_nationality)
                .HasMaxLength(50)
                .IsUnicode(false);
            entity.Property(e => e.human_party)
                .HasMaxLength(50)
                .IsUnicode(false);
            entity.Property(e => e.human_picture)
                .HasMaxLength(255)
                .IsUnicode(false);
            entity.Property(e => e.human_postcode)
                .HasMaxLength(10)
                .IsUnicode(false);
            entity.Property(e => e.human_pro_designation)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_qq)
                .HasMaxLength(15)
                .IsUnicode(false);
            entity.Property(e => e.human_race)
                .HasMaxLength(50)
                .IsUnicode(false);
            entity.Property(e => e.human_religion)
                .HasMaxLength(50)
                .IsUnicode(false);
            entity.Property(e => e.human_sex)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.human_society_security_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.human_speciality)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_telephone)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.human_major_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.lastly_change_time).HasColumnType("datetime");
            entity.Property(e => e.paid_salary_sum).HasColumnType("money");
            entity.Property(e => e.recovery_time).HasColumnType("datetime");
            entity.Property(e => e.regist_time).HasColumnType("datetime");
            entity.Property(e => e.register)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.remark).HasColumnType("text");
            entity.Property(e => e.salary_standard_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.salary_standard_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.salary_sum).HasColumnType("money");
            entity.Property(e => e.second_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.second_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.third_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.third_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<human_file_dig>(entity =>
        {
            entity.HasKey(e => e.hfd_id).HasName("human_file_dig_PK");

            entity.ToTable("human_file_dig");

            entity.Property(e => e.attachment_name)
                .HasMaxLength(255)
                .IsUnicode(false);
            entity.Property(e => e.change_time).HasColumnType("datetime");
            entity.Property(e => e.changer)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.check_time).HasColumnType("datetime");
            entity.Property(e => e.checker)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.delete_time).HasColumnType("datetime");
            entity.Property(e => e.demand_salaray_sum).HasColumnType("money");
            entity.Property(e => e.first_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.first_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_account)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.human_address)
                .HasMaxLength(200)
                .IsUnicode(false);
            entity.Property(e => e.human_bank)
                .HasMaxLength(50)
                .IsUnicode(false);
            entity.Property(e => e.human_birthday).HasColumnType("datetime");
            entity.Property(e => e.human_birthplace)
                .HasMaxLength(50)
                .IsUnicode(false);
            entity.Property(e => e.human_educated_degree)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_educated_major)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_email)
                .HasMaxLength(50)
                .IsUnicode(false);
            entity.Property(e => e.human_family_membership).HasColumnType("text");
            entity.Property(e => e.human_histroy_records).HasColumnType("text");
            entity.Property(e => e.human_hobby)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.human_id_card)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.human_major_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.human_major_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.human_major_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_mobilephone)
                .HasMaxLength(11)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.human_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_nationality)
                .HasMaxLength(50)
                .IsUnicode(false);
            entity.Property(e => e.human_party)
                .HasMaxLength(50)
                .IsUnicode(false);
            entity.Property(e => e.human_picture)
                .HasMaxLength(255)
                .IsUnicode(false);
            entity.Property(e => e.human_postcode)
                .HasMaxLength(10)
                .IsUnicode(false);
            entity.Property(e => e.human_pro_designation)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_qq)
                .HasMaxLength(15)
                .IsUnicode(false);
            entity.Property(e => e.human_race)
                .HasMaxLength(50)
                .IsUnicode(false);
            entity.Property(e => e.human_religion)
                .HasMaxLength(50)
                .IsUnicode(false);
            entity.Property(e => e.human_sex)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.human_society_security_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.human_speciality)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_telephone)
                .HasMaxLength(20)
                .IsUnicode(false);
            entity.Property(e => e.hunma_major_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.lastly_change_time).HasColumnType("datetime");
            entity.Property(e => e.paid_salary_sum).HasColumnType("money");
            entity.Property(e => e.recovery_time).HasColumnType("datetime");
            entity.Property(e => e.regist_time).HasColumnType("datetime");
            entity.Property(e => e.register)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.remark).HasColumnType("text");
            entity.Property(e => e.salary_standard_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.salary_standard_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.salary_sum).HasColumnType("money");
            entity.Property(e => e.second_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.second_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.third_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.third_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<major_change>(entity =>
        {
            entity.HasKey(e => e.mch_id).HasName("major_change_PK");

            entity.ToTable("major_change");

            entity.Property(e => e.change_reason).HasColumnType("text");
            entity.Property(e => e.check_reason).HasColumnType("text");
            entity.Property(e => e.check_time).HasColumnType("datetime");
            entity.Property(e => e.checker)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.first_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.first_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.human_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.major_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.major_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.new_first_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.new_first_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.new_major_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.new_major_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.new_major_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.new_major_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.new_salary_standard_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.new_salary_standard_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.new_salary_sum).HasColumnType("money");
            entity.Property(e => e.new_second_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.new_second_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.new_third_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.new_third_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.regist_time).HasColumnType("datetime");
            entity.Property(e => e.register)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.salary_standard_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.salary_standard_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.salary_sum).HasColumnType("money");
            entity.Property(e => e.second_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.second_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.third_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.third_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<salary_grant>(entity =>
        {
            entity.HasKey(e => e.sgr_id).HasName("salary_grant_PK");

            entity.ToTable("salary_grant");

            entity.Property(e => e.check_time).HasColumnType("datetime");
            entity.Property(e => e.checker)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.first_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.first_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.regist_time).HasColumnType("datetime");
            entity.Property(e => e.register)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.salary_grant_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.salary_paid_sum).HasColumnType("money");
            entity.Property(e => e.salary_standard_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.salary_standard_sum).HasColumnType("money");
            entity.Property(e => e.second_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.second_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.third_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.third_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<salary_grant_detail>(entity =>
        {
            entity.HasKey(e => e.grd_id).HasName("salary_grant_details_PK");

            entity.Property(e => e.bouns_sum).HasColumnType("money");
            entity.Property(e => e.deduct_sum).HasColumnType("money");
            entity.Property(e => e.human_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.human_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.salary_grant_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.salary_paid_sum).HasColumnType("money");
            entity.Property(e => e.salary_standard_sum).HasColumnType("money");
            entity.Property(e => e.sale_sum).HasColumnType("money");
        });

        modelBuilder.Entity<salary_standard>(entity =>
        {
            entity.HasKey(e => e.ssd_id).HasName("salary_standard_PK");

            entity.ToTable("salary_standard");

            entity.Property(e => e.change_time).HasColumnType("datetime");
            entity.Property(e => e.changer)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.check_comment).HasColumnType("text");
            entity.Property(e => e.check_time).HasColumnType("datetime");
            entity.Property(e => e.checker)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.designer)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.regist_time).HasColumnType("datetime");
            entity.Property(e => e.register)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.remark).HasColumnType("text");
            entity.Property(e => e.salary_sum).HasColumnType("money");
            entity.Property(e => e.standard_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.standard_name)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<salary_standard_detail>(entity =>
        {
            entity.HasKey(e => e.sdt_id).HasName("salary_standard_details_PK");

            entity.Property(e => e.item_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.salary).HasColumnType("money");
            entity.Property(e => e.standard_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.standard_name)
                .HasMaxLength(60)
                .IsUnicode(false);
        });

        modelBuilder.Entity<training>(entity =>
        {
            entity.HasKey(e => e.tra_id).HasName("training_PK");

            entity.Property(e => e.check_time).HasColumnType("datetime");
            entity.Property(e => e.checker)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.human_id)
                .HasMaxLength(30)
                .IsUnicode(false);
            entity.Property(e => e.human_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.major_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_kind_id)
                .HasMaxLength(2)
                .IsUnicode(false)
                .IsFixedLength();
            entity.Property(e => e.major_kind_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.major_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.regist_time).HasColumnType("datetime");
            entity.Property(e => e.register)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.remark).HasColumnType("text");
            entity.Property(e => e.training_degree)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.training_item)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.training_time).HasColumnType("datetime");
        });

        modelBuilder.Entity<user>(entity =>
        {
            entity.HasKey(e => e.u_id).HasName("users_PK");

            entity.Property(e => e.u_name)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.u_password)
                .HasMaxLength(60)
                .IsUnicode(false);
            entity.Property(e => e.u_true_name)
                .HasMaxLength(60)
                .IsUnicode(false);
        });
        //权限表
        modelBuilder.Entity<Menu>().ToTable("Menu");
        modelBuilder.Entity<Role>().ToTable("Role");
        modelBuilder.Entity<RoleMenuMid>().ToTable("RoleMenuMid");

        OnModelCreatingPartial(modelBuilder);
    }

    partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
}
